package com.mjh.zhujianju.enums;

/**
 * @author 刘洋
 * @Description: baner 模块位置展示
 * @date 2018/8/11 14:00
 */
public enum BanersEnum {

    BANERS_SITE_INDEX(1,"首页"),
    BANERS_SITE_PARTY(2,"党建"),
    BANERS_SITE_VISIT(3,"信访");

    private Integer code;
    private String name;

    public int getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    BanersEnum(Integer code, String name) {
        this.code = code;
        this.name = name;
    }
    
	public static String getName(Integer code){
        if(code == null){
            return null;
        }

        for (BanersEnum buildClassEnum : BanersEnum.values()){
			if (code.equals(buildClassEnum.getCode())){
                return buildClassEnum.getName();
            }
        }

        return null;
    }
}
